package c.c.b.a.b;

import c.c.b.a.b.a.d;
import c.c.b.a.b.a.e.b;
import c.c.b.a.b.a.e.c;
import c.c.b.a.b.a.e.g;
import c.c.b.a.b.a.e.i;
import c.c.b.a.b.a.i.e;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Objects;

/* compiled from: RealCall */
public final class b0 implements j {
    public final z a;
    public final i b;
    public s c;
    public final c0 d;
    public final boolean e;
    public boolean f;

    /* compiled from: RealCall */
    public final class a extends d {
        public void a() {
            throw null;
        }
    }

    public b0(z zVar, c0 c0Var, boolean z) {
        this.a = zVar;
        this.d = c0Var;
        this.e = z;
        this.b = new i(zVar, z);
    }

    public c a() throws IOException {
        synchronized (this) {
            if (this.f) {
                throw new IllegalStateException("Already Executed");
            }
            this.f = true;
        }
        this.b.d = e.a.c("response.body().close()");
        Objects.requireNonNull(this.c);
        q qVar;
        try {
            q qVar2 = this.a.a;
            synchronized (qVar2) {
                qVar2.d.add(this);
            }
            c b = b();
            qVar = this.a.a;
            qVar.a(qVar.d, this, false);
            return b;
        } catch (IOException e) {
            try {
                Objects.requireNonNull(this.c);
                throw e;
            } catch (Throwable th) {
                qVar = this.a.a;
                qVar.a(qVar.d, this, false);
            }
        }
    }

    public c b() throws IOException {
        ArrayList arrayList = new ArrayList(this.a.e);
        arrayList.add(this.b);
        arrayList.add(new b(this.a.i));
        arrayList.add(new c.c.b.a.b.a.a.b(this.a.j));
        arrayList.add(new c.c.b.a.b.a.c.a(this.a));
        if (!this.e) {
            arrayList.addAll(this.a.f);
        }
        arrayList.add(new c(this.e));
        c0 c0Var = this.d;
        s sVar = this.c;
        z zVar = this.a;
        return new g(arrayList, null, null, null, 0, c0Var, this, sVar, zVar.w, zVar.x, zVar.y).a(c0Var);
    }

    public Object clone() throws CloneNotSupportedException {
        z zVar = this.a;
        b0 b0Var = new b0(zVar, this.d, this.e);
        b0Var.c = ((t) zVar.g).a;
        return b0Var;
    }
}
